import store from '@/store/index';
import request from '@/utils/request';

export function editMusicStatus({
  sort,
  heartWallId,
}) {
  return request.post('music/editMusicStatus', {
    splid: store.state.liveId,
    heart_wall_id: heartWallId,
    sort,
  });
}

export function getMusicList({ startTime } = {}) {
  const params = {
    splid: store.state.liveId,
    is_delete: 0,
    type: 'Music',
  };
  if (startTime) {
    params.start_time = startTime;
  }
  return request.post('music/musicList', params);
}
